<?php

/**
 * Smarty {muffin_headers} function plugin
 *
 * Type:     function
 * Name:     muffin_headers
 * Purpose:  echo the headers for in the TPL
 * 
 * @author Kozie <flamefingers at gmail dot com>
 * @param array $params
 * @param Smarty
 */

function smarty_function_muffin_headers( $params, &$smarty )
{
	
	$s = Muffin::tpl();
	
	echo '<link rel="stylesheet" type="text/css" href="'. $s->template_dir .'/css/panel.css" />' . "\n\t";
	echo '<link rel="stylesheet" type="text/css" href="'. $s->template_dir .'/css/shadowbox.css" />' . "\n\n\t";
	
	echo '<script type="text/javascript" src="'.$s->template_dir.'js/jquery.js"></script>' . "\n\t";
	echo '<script type="text/javascript" src="'.$s->template_dir.'js/tinymce/tiny_mce.js"></script>'. "\n\t";
	echo '<script type="text/javascript" src="'.$s->template_dir.'js/shadowbox/adapter/shadowbox-jquery.js"></script>' . "\n\t";
	echo '<script type="text/javascript" src="'.$s->template_dir.'js/shadowbox/shadowbox.js"></script>' . "\n\t";
	echo '<script type="text/javascript" src="'.$s->template_dir.'js/muffin.fn.js"></script>' . "\n\n\t";
	
	echo '<script type="text/javascript">
		$(document).ready( function()
		{
		
		    Shadowbox.init();
		
		});';
	echo '</script>';
	
	return;
}

?>